from django.template.library import Library

from main.models import Category,Tag

register = Library()

@register.simple_tag
def get_categorys():
    return Category.objects.filter(parent__isnull=True)

@register.simple_tag
def get_tags():
    return Tag.objects.filter( )
